﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using SQLServerHealthCheck.SQLServer;
using System.Configuration;

namespace SQLServerHealthCheck.PL
{
    public partial class OverviewTablesAndIndexes : Form
    {
         HealthCheckControlPanel hccp;
        public OverviewTablesAndIndexes(HealthCheckControlPanel controlPanel)
        {
             hccp = controlPanel;
            InitializeComponent();
        }

        private void PerformanceHealthCheckResults_Load(object sender, EventArgs e)
        {
            try
            {

                // TODO: This line of code loads data into the 'SQLServerHealthCheckDataSet.ServersAndInstances' table. You can move, or remove it, as needed.

                this.TableAdapterDatabaseFragmentation.Connection.ConnectionString = ConfigurationManager.AppSettings["ConnectionStringSSHCDatabase"];
                this.TableAdapterDatabaseFragmentation.Fill(this.DataSetDatabaseFragmentation.DataTableDatabaseFragmentation);

                rvPerformanceDatabaseFragmentation.LocalReport.ReportPath = System.Windows.Forms.Application.StartupPath + @"\Reports\PerformanceDatabaseFragmentation.rdlc";

                this.WindowState = FormWindowState.Maximized;

                this.rvPerformanceDatabaseFragmentation.RefreshReport();
               




               
            }
            catch (Exception ex)
            {


              //  InstallationCheck.WriteExceptioninFile("Form:PerformanceHealthCheckResults  Method: PerformanceHealthCheckResults_Load " + ex.Message.ToString());

                MessageBox.Show(ex.Message, "HealthCheck", MessageBoxButtons.OK, MessageBoxIcon.Error);         

            
            }

           
        }


       

      

    }
}
